/**
 * 作者：陈文斌 on 2019/1/5.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'contact_info_model.dart';
import 'package:crm/model/MarketSituation/market_situation_info_model.dart';
import 'principal_info_model.dart';

part 'client_info_model.g.dart';

@JsonSerializable()
class ClientInfoModel extends Object with _$ClientInfoModelSerializerMixin {
  String companyId;
  String companyName;
  List<ContactInfoModel> contacts;
  String creditLimit;
  String creditLimitUsed;
  int customerType;
  String exdealDate;
  double exdealProbability;
  String id;
  String industryAttributes;
  String industryClassification;
  int isFccustomer;
  int isMark;
  String location;
  List<MarketSituationInfoModel> marketSituationByCustomer;
  String phone;
  String potentialCustomerId;
  List<PrincipalInfoModel> principals;
  String salesMoney;
  String salesStage;
  String streetaddress;
  int companyType;

  ClientInfoModel(
    this.companyId,
    this.companyName,
    this.contacts,
    this.creditLimit,
    this.creditLimitUsed,
    this.customerType,
    this.exdealDate,
    this.exdealProbability,
    this.id,
    this.industryAttributes,
    this.industryClassification,
    this.isFccustomer,
    this.isMark,
    this.location,
    this.marketSituationByCustomer,
    this.phone,
    this.potentialCustomerId,
    this.principals,
    this.salesMoney,
    this.salesStage,
    this.streetaddress,
    this.companyType,
  );

  @override
  factory ClientInfoModel.fromJson(Map<String, dynamic> json) =>
      _$ClientInfoModelFromJson(json);
}
